<?php
    $rootpath=str_replace('\\','/',dirname(__FILE__));
	chdir($rootpath);
	define('ROOTPATH',$rootpath);
	
	function aaa($a,$b){
		echo $a+$b;
	}	
	
	function echoln($str=""){
		echo "{$str}<br>";
	}
	
	function getpath(){
//		$rt=$_SERVER['CONTEXT_DOCUMENT_ROOT'];

//		$sf=$_SERVER['SCRIPT_FILENAME'];

		$xddir=str_ireplace($_SERVER['CONTEXT_DOCUMENT_ROOT'],'',$_SERVER['SCRIPT_FILENAME']);

		$level_number=count(explode('/',$xddir));

		$xddir="";
		if($level_number==1){
			$xddir='./';
		}else{
			for($i=1;$i<$level_number;$i++){
				$xddir .='../';
			}	
		}
		return $xddir;
	}
?>